﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataAccess
{
    /// <summary>
    /// 系统用户表
    /// </summary>
    [Table("sysuser")]
    [PrimaryKey(nameof(merchantid), nameof(userid))]
    public class SysUser
    {
        /// <summary>
        /// 商户主键
        /// </summary>
        public long merchantid { get; set; }

        /// <summary>
        /// 用户id
        /// </summary>
        public long userid { get; set; }

        /// <summary>
        /// 账户
        /// </summary>
        public string? account { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        public string? password { get; set; }

        /// <summary>
        /// 昵称
        /// </summary>
        public string? nickname { get; set; }

        /// <summary>
        /// 电话
        /// </summary>
        public string? phone { get; set; }

        /// <summary>
        /// 住址
        /// </summary>
        public string? address { get; set; }

        /// <summary>
        /// 头像地址
        /// </summary>
        public string? avatarurl { get; set; }

        /// <summary>
        /// 状态： 0：正常，1：禁用
        /// </summary>
        public int status { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime updatetime { get; set; }

        /// <summary>
        /// 管理级别： 0：超管，1：商户管理员，2：商户的客户
        /// </summary>
        public int adminlevel { get; set; }
    }
}
